<template>
	<tabBar :currentPage="0"></tabBar>
	<view class="home">
		<topVue top="2" text="智慧社区">
			<view class="home-list">
				<!-- 轮播图 -->
				<view class="uni-margin-wrap">
					<swiper class="swiper" indicator-active-color="#fff" circular :indicator-dots="true"
						:autoplay="true" :interval="2000" :duration="500">
						<swiper-item>
							<image src="https://cdn7.axureshop.com/demo/1996612/images/%E9%A6%96%E9%A1%B5/u720.png">
							</image>
						</swiper-item>
						<swiper-item>
							<image src="https://cdn7.axureshop.com/demo/1996612/images/%E9%A6%96%E9%A1%B5/u721.png">
							</image>
						</swiper-item>
						<swiper-item>
							<image src="https://cdn7.axureshop.com/demo/1996612/images/%E9%A6%96%E9%A1%B5/u718.png">
							</image>
						</swiper-item>
					</swiper>
				</view>
				<NoticeBar></NoticeBar>
				<!-- 日常服务 -->
				<view class="home_re">日常服务</view>
				<HomeFn></HomeFn>
				<view class="home_re">智慧社区</view>
				<communityVue></communityVue>
				<view class="home_re">社区活动</view>
				<activityVue></activityVue>
				<view style="height: 200rpx;"></view>
			</view>
		</topVue>
	</view>
	<!-- </tabBar> -->
</template>

<script setup>
import topVue from "../../../components/top/top.vue";
import NoticeBar from "./components/NoticeBar.vue"
import HomeFn from "./components/home-Fu.vue"
import communityVue from "./components/community.vue";
import activityVue from "./components/activity.vue";
import axios from '/axios/axios.js'
import {
	ref
} from "vue"

import { onLaunch } from "@dcloudio/uni-app"

// 首先判断是否登录
axios.post('/profile').then(res => {
	if (res.status == 200) {
		// 获取用户信息成功
		localStorage.setItem("user", JSON.stringify(res.data.user))
	} else {
		// 获取用户信息成功
		isLogin.value = false
	}
}).catch(err => {
	console.log(err);

})
</script>

<style lang="scss">
.home-list {
	margin-top: 88rpx;
	z-index: 400;
}

.uni-margin-wrap {
	margin-top: 100rpx;
	padding: 0 20rpx;

	image {
		width: 100%;
		height: 100%;
	}
}

.home_re {
	margin-left: 20rpx;
	height: 80rpx;
	line-height: 80rpx;
	font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑', sans-serif;
	font-weight: 600;
	font-style: normal;
	font-size: 26rpx;
	color: #555555;
}
</style>